package com.hero.jobweb.action;

import com.hero.jobweb.config.SystemKey;
import com.hero.jobweb.entity.TbUsers;
import com.hero.web.action.BasePaginationAction;

public class JobWebBaseAction extends BasePaginationAction{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	/**
	 * 获取当前个人登录用户
	 * @return
	 */
	protected TbUsers getPersonalUser()
	{
		return (TbUsers) session.getAttribute(SystemKey.PERSONAL_USER.toString());
	}
	
	/**
	 * 获取当前企业登录用户
	 * @return
	 */
	protected TbUsers getEnterpriseUser()
	{
		return (TbUsers) session.getAttribute(SystemKey.PERSONAL_USER.toString());
	}
	
	/**
	 * 获取个人用户Id
	 * @return
	 */
	protected Integer getPersonalUserId()
	{
		return (Integer) session.getAttribute(SystemKey.PERSONAL_USER_ID.toString());
	}
	
	/**
	 * 获取企业Id
	 * @return
	 */
	protected Integer getEnterpriseId()
	{
		return (Integer) session.getAttribute(SystemKey.ENTERPRISE_ID.toString());
	}
	
	/**
	 * 获取企业用户Id
	 * @return
	 */
	protected Integer getEnterpriseUserId()
	{
		return (Integer) session.getAttribute(SystemKey.ENTERPRISE_USER_ID.toString());
	}
}
